{% extends 'worklink/base.html' %}
{% load static %}
{% load utils %}
{% block content %}

<div class="header-inner bg-light">
    <div class="container">
        <div class="row">
            <div class="col-lg-9 col-md-12">
                <h2 class="text-primary">{{ title }}</h2>
                <ol class="breadcrumb mb-0 p-0">
                    <li class="breadcrumb-item"><a href="{% url 'index' %}">Домой</a></li>
                    <li class="breadcrumb-item active">
                        <i class="fas fa-chevron-right"></i>
                        <a href="{% url 'company:my-vacancies' %}">Вакансии компании</a>
                    </li>
                    <li class="breadcrumb-item active"> <i class="fas fa-chevron-right"></i> <a href="{% url 'mainapp:vacancy_responses' object.vacancy.pk %}">{{ sub_title }}</a></li>
                    <li class="breadcrumb-item active"> <i class="fas fa-chevron-right"></i> <span>{{ title }}</span></li>
                </ol>
            </div>
            <div class="col-lg-3 col-md-12 mt-md-4 text-right">
                <a href="{% url 'company:my-vacancies' %}" class="btn btn-outline-success">Назад</a>
            </div>
        </div>
    </div>
</div>

<section class="mt-5 mb-5">
    <div class="container">
        <div class="row">
            <div class="col-lg-6 col-md-12">
                <h4>Отклик</h4>
                <p><a href="{% url 'mainapp:resume_detail' object.resume.pk %}">{{ object.resume }} ({{ object.resume.user }})</a></p>
                <strong>Сопроводительное письмо</strong>
                <p>{{ object.cover_letter }}</p>
            {% if success %}
                <div class="alert alert-success">{{ success_message }}</div>
            {% endif %}
                <form action="{{ form_action }}" method="post">
                    {% csrf_token %}
                    {% for hidden in form.hidden_fields %}
                    {{ hidden }}
                    {% endfor %}
                    <div class="form-row">
                        {% for field in form.visible_fields %}
                            <div class="form-group col-12">
                                {{ field.errors }}
                                {{ field.label_tag }} {{ field }}
                            </div>
                        {% endfor %}
                    </div>
                    <div class="input-group">
                        <button type="submit" class="btn btn-success btn-block">{{ submit_title }}</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
</section>

{% endblock %}
